package com.longge.wechat.controller.web;


import java.io.IOException;
import java.util.List;

import javax.annotation.Resource;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.longge.wechat.entity.ShopEntity;
import com.longge.wechat.service.ShopService;




@Controller
public class ShopEventController {
	@Resource
	private ShopService shopServiceImpl;
	
	
	
	//商铺管理主界面
	@RequestMapping(value ="/shop.do",method = RequestMethod.GET)
	public void shopManage(HttpServletRequest request,HttpServletResponse response) throws ServletException, IOException{
		
		List<ShopEntity> list = shopServiceImpl.findAllShop(null,Integer.MAX_VALUE, 0);
		for (ShopEntity shopEntity : list) {
			System.out.println("名称："+shopEntity.getName()+"---地址："+shopEntity.getAddress());
		}
		/*ShopEntity entity = shopServiceImpl.findShopById(12);
		entity.setName("滨江区店铺3号");
		shopServiceImpl.updateShop(entity);*/
	}
}
